package com.mini.mysql.service;

import com.mini.mysql.model.BusinessPlanSitePageR;
import com.mini.mysql.repository.BusinessPlanSitePageRRepository;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Objects;

/**
 * 项目名称：mini-data-es
 * 类 名 称：BusinessPlanSitePageRService
 * 类 描 述：TODO
 * 创建时间：2021/4/2 上午10:59
 * 创 建 人：zhanghuiying
 */
@Service
@Slf4j
public class BusinessPlanSitePageRService {

    @Autowired
    private BusinessPlanSitePageRRepository businessPlanSitePageRRepository;

    public List<BusinessPlanSitePageR> findByPlanSite(List<Integer> planId) {
        if (CollectionUtils.isEmpty(planId)){
            return null ;
        }
        return businessPlanSitePageRRepository.findByPlanSite(planId);
    }
}
